const koa = require('koa')
//express : const app = express();
const static = require('koa-static')
// const router = require('./router')
const app = new koa()
const path = require('path')

app.use(static(
  path.resolve(__dirname,'./static')
))
//express: (req,res)
// app.use(async (ctx) => {
//   console.log(ctx);
//   let context = router(ctx.request.url)
//   if(ctx.request.url.indexOf('.css')>-1){
//     ctx.set("Content-Type","text/css")
//   }else{
//     ctx.set("Content-Type","text/html")
//   }
//   ctx.body = context;
// })

app.listen(3000, () => {
  console.log('localhost:3000 start..')
})